package cn.peach.hrm.doc;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

/**
 * @Author you
 * @create 2021/11/28 14:59
 */
@Document(indexName = "hrmtest",type = "course")
@Data
public class CourseDoc {
    @Id
    private Long id;
    @Field(type = FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String name;
    @Field(type = FieldType.Keyword)
    private String forUser;
    @Field(type = FieldType.Keyword)
    private String gradeName;

    private Long courseTypeId;
    @Field(type = FieldType.Keyword)
    private String tenantName;

    private Long tenantId;

    private Integer saleCount;

    private Integer viewCount;

    private Integer commentCount;

    private Date onlineTime;

    @Field(type = FieldType.Keyword)
    private String chargeName;

    private Float price;

    private Float priceOld;
}
